{% extends "simple.html" %}

{% block head %}
<script type="text/javascript">
var t_start = Number(new Date());
</script>
<script src="http://stevesouders.com/bin/resource.cgi?type=js&sleep=4&n=1&t={{ epoch }}" type="text/javascript"></script>
<script src="http://stevesouders.com/bin/resource.cgi?type=js&sleep=4&n=2&t={{ epoch }}" type="text/javascript"></script>
{% endblock %}

{% block body %}

<div id=results>&nbsp;</div>

<script>
function doTest() {
	var t_end = Number(new Date());

	if ( (t_end - t_start) > 7000 ) {
		document.getElementById('results').innerHTML = "scripts block, they aren't loaded in parallel";
		parent.saveResult('parscript', 0);
	}
	else {
		document.getElementById('results').innerHTML = "scripts are loaded in parallel with other resources";
		parent.saveResult('parscript', 1);
	}
}

window.onload = doTest;
</script>

<p>
This test determines if your browser can download scripts in parallel.
This test loads two scripts that each take 4 seconds to return. 
If the page load time is under 8 seconds that means the scripts were downloaded in parallel.

{% endblock %}
